package com.test;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import com.po.Login;

public class Test {
	public static void main (String [] args) throws IOException {
		
			InputStream is =Resources.getResourceAsStream("mybatis-config.xml");
			SqlSessionFactory factory=new SqlSessionFactoryBuilder().build(is);
			SqlSession sqlSession =factory.openSession();
			List<Login> lst=sqlSession.selectList("com.po.LoginMapper.find_qianSeng");
			for(int i=0; i<lst.size(); i++) {
				Login log= lst.get(i);
				System.out.println(log.getPid()+" "+log.getPname()+" "+log.getPage()+" "+log.getCard_id());
			}
	}
}
